package com.gitee.swsk33.annotationbased.service.impl;

import com.gitee.swsk33.annotationbased.service.MessageService;
import com.gitee.swsk33.annotationbased.service.SendService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class SendServiceImpl implements SendService {

	// 本类依赖MessageService类型对象，在此设定为本类字段以调用
	// 在基于注解的Bean定义中，使用自动装配即可
	@Autowired
	private MessageService messageService;

	@Override
	public void send() {
		System.out.print("调用MessageService：");
		messageService.print();
	}

}